package com.title2;

import java.io.File;
import java.util.Scanner;

/**
 * @Author milian
 * @Date 2021/7/31 0031 20:28
 */
public class title2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入文件路径：");
        String path = sc.nextLine();
        File file = new File(path);
        File[] files = file.listFiles();
        for (File file1 : files) {
            System.out.println(file1.getName());
        }
    }
}
